package com.liu.text;

import com.liu.config.beanConfig;
import com.liu.proxyDemo.Dog;
import com.liu.proxyDemo.Person;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class ConfigText {

    public static void main(String[] args) {
        ApplicationContext  context = new AnnotationConfigApplicationContext(beanConfig.class);
        Person person = context.getBean("getUser",Person.class);
        System.out.println(person.getName());
        Dog dog = person.getDog();
        System.out.println(dog.getName());
    }
}

